package com.manjiwang.middleground.feign;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 商品服务feign接口
 * @Author Yang Hai Feng
 * @Date 2021/8/10 22:25
 */
@FeignClient("goods-service")
public interface GoodsFeignService {

    /**
     * 模拟减库存，每次商品数量-1
     *
     * @param id
     * @return
     */
    @GetMapping("/goods/updateGoods")
     JSONObject updateGoods(@RequestParam("id") String id);
}
